from myelin.Ns import MYELIN
from myelin.rdf.bindery.ObjectTypes import LiteralTypeO

from Document import Document

from ObjectTypes import \
    ContainerTypeO, ContainerTypeS, \
    NodeGroupingTypeO

from mappings import \
    ContainerMap, ContainsMap, \
    ContainsUnpublishedMap, ContainsExpiredMap, \
    NodeGroupingMap

class Container(Document):
    
    ModelTypes = (ContainerTypeO, ContainerTypeS)
    
    RDF_BINDINGS = {
        'mOrder_By'             : ((MYELIN, 'order-by'), LiteralTypeO, ContainerMap),
        'mOrder_Direction'      : ((MYELIN, 'order-direction'), LiteralTypeO, ContainerMap),
        'mOrder_Type'           : ((MYELIN, 'order-type'), LiteralTypeO, ContainerMap),
        'mContains'             : ((MYELIN, 'contains'), ContainerTypeO, ContainsMap),
        'mContains_Grouping'    : ((MYELIN, 'contains-grouping'), NodeGroupingTypeO, NodeGroupingMap),
        'mDefault_Grouping_Title' : ((MYELIN, 'default-grouping-title'), LiteralTypeO, ContainerMap),
         
        'mHasPart'              : ['mContains','mContains_Grouping','mTranslation']
    }

    
CLASS_TYPES = {
    MYELIN + 'Container' : Container,
}